<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>表单对象属性过滤选择器</title>
		<script type="text/javascript" src="../js/jquery-1.7.2.js"></script>
		<script type="text/javascript">
			$(function(){
				//获取下拉框中选中的option
				// console.log($("select option"));
				// console.log($("#testId option:selected"))
				//测试:checked
				console.log($(":radio:checked"));
				console.log($(":checkbox:checked"));
				console.log($("[name='username']"));


			})
		</script>
	</head>
	<body>
			下拉列表1: <br>
			<select id="testId">
				<option>浙江</option>
				<option>辽宁</option>
				<option selected>北京</option>
				<option selected>天津</option>
				<option>广州</option>
				<option>湖北</option>
			</select>
			<input type="radio">
			<input type="radio" checked>
			<input type="checkbox">
			<input type="checkbox" checked>
			<input type="checkbox" checked>
			<input type="text" name="username" checked>
		</form>
	</body>
</html>

